using System;
using System.Collections.Generic;

namespace XmlObjects.Types.CCNet.Triggers
{
	public class IntervalTrigger : Trigger
	{
		private int seconds;

		[Attrib("seconds")]
		public int Seconds
		{
			get { return seconds; }
			set { seconds = value; }
		}
	}

	public class FilterTrigger : Trigger
	{
		private string startTime;
		private string endTime;
		private Trigger trigger;
		private List<string> weekDays;

		[Attrib("startTime")]
		public string StartTime
		{
			get { return startTime; }
			set { startTime = value; }
		}

		[Attrib("endTime")]
		public string EndTime
		{
			get { return endTime; }
			set { endTime = value; }
		}

		[Property("trigger", FindSubTypeBy = "type")]
		[SubType("intervalTrigger", typeof(IntervalTrigger))]
		public Trigger Trigger
		{
			get { return trigger; }
			set { trigger = value; }
		}

		[Property("/weekDays/weekDay")]
		public List<string> WeekDays
		{
			get { return weekDays; }
			set { weekDays = value; }
		}
	}
}